package com.android.toast

import android.view.View

/**
 * @Author LuoKun
 * @Des
 */
class ViewLongClickWrapper : View.OnLongClickListener {

    private var mToast: AndroidToast<*>
    private var mListener: AndroidToast.OnLongClickListener<View>

    constructor(mToast: AndroidToast<*>, mListener: AndroidToast.OnLongClickListener<View>) {
        this.mToast = mToast
        this.mListener = mListener
    }

    override fun onLongClick(p0: View): Boolean {
        return if (mListener == null) {
            false
        } else mListener.onLongClick(mToast, p0)
    }

}